<?php

/**
 *用户好友值抽奖记录表
 */

namespace App\Models\MainDB\Shareprize;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;

class ShareprizePeriod extends Model
{

    protected $table = 'ln_shareprize_period';     //数据库内完整表名

    protected $primaryKey = 'id';    //主键名

    protected $fillable = [
        "id",
        "period_name",
        "start_time",
        "end_time",
    ];

    public $timestamps = false;

    public function getFillable()
    {
        // 直接返回表的所有的字段信息
        $table   = $this->getTable();
        $columns = Schema::getColumnListing($table);
        unset($columns['id']);

        return $columns;
    }
}
